<style>
.bidthe{color: #fff;
    left: 0px;
    position: absolute;
}
.bidthe dd {
    background-color: #980000;
    border-radius: 0 0 5px 5px;
    float: left;
    font-size: 11px;
    margin: 0 0px 0 5px;
    padding: 1px 5px;
}
.bidthe dd.aone{background-color: #d23030;} 
.bidthe dd.spec{background-color: #d23030;}
.bidthe dd.meet{background-color: #d23030;}

.bidthe dd.ing{background-color: #d23030;} 
.bidthe dd.fut{background-color: #d23030;}
.bidthe dd.end{background-color: #d23030;}

.bidthe dd.pm{background-color: #d23030;}
.bidthe dd.jb{background-color: #d23030;}
.nav-wrap {
	width:100%;
	background-color:#fff;
	padding:.3rem 0;
	overflow-y:hidden;
	overflow-x:scroll;
	white-space:nowrap;
	-webkit-overflow-scrolling:touch;
	animation:all .2s
}
.nav-wrap .nav {
	display:inline-block;
	margin:0 .2rem;
	font-size:.6rem;
	line-height:.12rem;
	color:#433e33;
	padding:0 .4rem
}
.nav-wrap .nav-cur {
	color:#cc2729;
	line-height:.8rem;
	position:relative;
	margin:0 .1rem 0 .4rem
}
.nav-wrap .nav-cur:after {
	content:"";
	position:absolute;
	top:0;
	left:0;
	width:200%;
	height:200%;
	box-sizing:border-box;
	transform:scale(.5);
	transform-origin:left top;
	border-radius:.43rem
}
.album {
	margin-bottom:.2rem;
	background-color:#fff
}
.album a {
	display:block
}
.album .album-pic {
	position:relative;
	height:5.5rem
}
.album .album-pic:after {
	content:"";
	position:absolute;
	left:3.4rem;
	bottom:-1px;
	width:1.4rem;
	height:.5rem;
	background:url(data:image/png;
	base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAgCAYAAAAR1VaeAAAABGdBTUEAALGPC/xhBQAAAnpJREFUaAXtmj1PFFEUhnfAwEa22iBIYmf8CoHCWECnjcViZ6HBaKICNvBP+PgHmLiJna0dBqlIlI4gaOwwLAmlmt2oGZ5j7iRTDMvuzs6dnXPnJE/ucOfjnve8d+7MLlsoKAvf9y8pk1To0yYIPePaNOUmZcBRjSbdz0Dd3U2R59EYSFzWVAVtd9I9Y07QqvBKm0kV48qMCne0iWCJG4GGrHVEHUa0aNR0J73ClAFjzCDtghaTVOjgrinBEYRD/i6pEKhBBGashN0JbS9r0Jd5DRgyCX9CxoQ3pX8i8yKzLAADBuFT2JWIbdkvz6g80qgAxX8dYUpU13oa+Tk/Jk4sRbnRpG/R+aLZLABGPIa/TQyJ2iXPp0c283R2LAr9BNo1KDBNzpt1tng2hFPgF/AvqHiHrRj13Ea+To1BUS/AWoemnHXaKjv6nSpkUmIp5DB8OKvSMfs35PpJ5e7EdSngA/gR04jzTj/kgPxb83ZnFEUrw5vzqtvl/TJeud1cnTueIvXDS6hBGiFfysrLSf6sipp9FEaWtl3ohZA88iVQjKIQHlRgC3oxPpKU5OdFTSzVfYguwjzsQRZC8pyDYhrGWJ0hiLyDyKcgn/qz+Op7Qt5voep53mdaK5G4SRhzHSUP4RnctKLKziBfGKYK7zDsa5JDdt0ksyTcJWn55Y5wFbTHdwS+N2xiWr2bgmObhClXSGjKME17G1JZuxm3F0IM2oHtAEw7jJNYSyZhxEUGGYNrcANk2ZL2Fqj6tSh6kogaF5Xl8QD2TfuN9ggDf9M2DXkFlg9uMvMD5F/NQzBqEBNK0JKhHJdH6xXwOfQniInHhl+0DZA78j+nSrwUv1QqE5kAAAAASUVORK5CYII=) no-repeat;
	background-size:cover
}
.album .album-pic img {
	width:100%;
	height:5.5rem
}
.album .album-pic i.isIn618 {
	position:absolute;
	top:0;
	right:.2rem;
	width:.8rem;
	height:1.5rem;
	background:url(//img11.360buyimg.com/uba/jfs/t18436/204/2624933613/6041/3c19ff9d/5b04dfd5N9741a42e.png) no-repeat top/100% auto
}
.album .album-pic .counter {
	position:absolute;
	left:-.3rem;
	bottom:.4rem;
	padding:0 .2rem 0 .5rem;
	line-height:.82rem;
	border-radius:.6rem;
	font-size:.5rem;
	color:#fff
}
.album .album-pic .counter.nostart {
	background-color:#268e66
}
.album .album-pic .counter.doing {
	background-color:#cc2729
}
.album .album-pic .counter.end {
	background-color:#8a8a8a
}
.album .album-top {
	display:-ms-flexbox;
	display:-webkit-box;
	display:box;
	display:flex;
	box-pack:justify;
	-ms-flex-pack:justify;
	justify-content:space-between;
	-webkit-justify-content:space-between;
	box-align:start;
	-ms-flex-align:start;
	align-items:flex-start;
	-webkit-align-items:flex-start;
	padding:.3rem .2rem;
	color:#433e33
}
.album .album-top .album-tit {
	width:5rem;
	line-height:1rem;
	font-size:.6rem;
	font-weight:500;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap
}
.album .album-top .album-bids {
	line-height:1rem;
	font-size:.5rem
}
.album .album-bottom {
	padding:.4rem;
	overflow-y:hidden;
	overflow-x:scroll;
	white-space:nowrap
}
.album .album-bottom a img {
	width:1.41rem;
	height:1.41rem;
	margin-right:1px
}
.album .album-bottom a:first-child img {
	margin-left:-1px
}
.album .album-bottom a:last-child img {
	margin-right:0
}
.album .album-ad {
	position:relative
}
.album .album-ad img {
	width:100%;
	height:5rem
}
    </style>
<div class="fui-page fui-page-current page-goods-list">
<div class="fui-content navbar" style="top:0">
	<div class="fui-header searchtop" ng-init="get_data(pagedata.extradata,'getmaindata',{plugin:'jy_jdpm',action:'get_data',op:'member'})">
			<div class="fui-header-left">
				<img class="leftlogo" ng-src="{{tomedia(pagedata.pluginset.logo) || '../core/resource/images/nopic.jpg'}}"/>
			</div>
			<div class="fui-header-input">
						<div class="searchbar searchbar-active" style="margin-left:1.6rem">
						<div class="fui-cellone" style="padding:0;">
								 <div class="fui-cellone-info">
									<div class="search-input" style="height:1.6rem">
										<form action="javascript:return true">
										<i id="searchsub" class="icon icon-sousuo1 bold" ng-click="pagedata.getlist(1)" style="line-height: 1.7rem;"></i>
										<input type="search" placeholder="输入关键字" class="search" ng-model="pagedata.params.keyword" style="height:1.6rem;border: 0;text-align: left; color: #999; font-size:0.6rem;border-radius: 1rem;" />
										</form>
									</div>
								 </div>
								 <div class="fui-cellone-remark noremark">
									<span style="margin-left:0.3rem;font-size: 0.75rem;" ng-click="pagedata.getlist(1)">搜索</span>
								 </div>
						</div>
						</div>
			</div>
			<div class="fui-header-right" data-nomenu="true">
				<a href="javascript:;" ng-click="access_json('jy_jdpm/member.mysms/notice/isread=0')"><i class="icon jinyunicon icon-xiaoxi1" style="font-size:20px;color:#333"></i></a>
				<span ng-if="pagedata.extradata.getmaindata.smsnum>0" style="position: absolute;top:0.5rem;left: 1.33rem;display: block;width: 0.33rem;height: 0.33rem;border-radius: 100%;background-color: red;color: #FFF;"></span>
			</div>
	</div>
	<div class="fui-tab fui-tab-danger" style="margin-top:2rem">
         <a ng-class="{'active': pagedata.status==11}" href="javascript:;" ng-click="access_json('jy_jdpm/goodslist//','status=11&cid='+pagedata.cid+'&pid='+pagedata.pid)">不限</a>
		 <a ng-class="{'active': pagedata.status==1}" href="javascript:;" ng-click="access_json('jy_jdpm/goodslist//','status=1&cid='+pagedata.cid+'&pid='+pagedata.pid)">正在拍</a>
		 <a ng-class="{'active': pagedata.status==3}" href="javascript:;" ng-click="access_json('jy_jdpm/goodslist//','status=3&cid='+pagedata.cid+'&pid='+pagedata.pid)">预展</a>
		 <a ng-class="{'active': pagedata.status==2}" href="javascript:;" ng-click="access_json('jy_jdpm/goodslist//','status=2&cid='+pagedata.cid+'&pid='+pagedata.pid)">已结束</a>
	</div>
	<div class="nav-wrap">
		<span ng-class="{'nav J_ping':1,'nav-cur':pagedata.cid == 0}" ng-click="access_json('jy_jdpm/goodslist/','pid='+pagedata.pid)">不限</span>
		<span ng-repeat="vo in pagedata.Classify" ng-class="{'nav J_ping':1,'nav-cur':pagedata.cid == vo.id}" ng-click="access_json('jy_jdpm/goodslist/','cid='+vo.id+'&pid='+pagedata.pid)">{{vo.title}}</span>
	</div>
	<div ng-if="pagedata.goods.length>0" class="fui-goods-group block border">
			<div ng-repeat="item in pagedata.goods" class="fui-goods-item">
				<a ng-click="access_json('/detail//id='+item.id)" >
					<dl class="bidthe">
                                        <!--拍卖类型-->
										<dd ng-show="item.status == 0" class="pm goodsuptime{{item.id}}">距离开拍：<span class="day">-</span><span class="dw">天</span><span class="hour">-</span><span class="dw">时</span><span class="minute">-</span><span class="dw">分</span><span class="second">-</span><span class="dw">秒</span></dd>
                                        <dd ng-show="item.status == 1" class="jb goodsuptime{{item.id}}">距离结束：<span class="day">-</span><span class="dw">天</span><span class="hour">-</span><span class="dw">时</span><span class="minute">-</span><span class="dw">分</span><span class="second">-</span><span class="dw">秒</span></dd>
                                        <dd ng-show="item.status == 2" class="spec">已经结束</dd>
                                        <!--拍卖类型-->
                    </dl>
					<div class="image" style="background-image: url('{{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}}')">
						<div ng-show="item.total <=0" class="salez" style="background-image: url('{{tomedia(pagedata.shopset.shop.saleout)}}'); "></div>
					</div>
				</a>
				<div class="detail">
					<a href="javascript:;" ng-click="access_json(item.active.url || '/detail//id='+item.id)">
						<div class="name">
							<i class="fui-tag fui-tag-danger">竞价</i>
							{{item.pname}}
						</div>
					</a>
					<div class="price" style="margin-top: 0.3rem" href="javascript:;" ng-click="access_json('jy_jdpm/detail//id='+item.id)">
						<span class="text">￥ {{item.nowprice >0 ? item.nowprice : item.onset}}
						</span>
						<span class="text subtitle r">
							{{item.bidcount || '0'}}次出价
						</span>
					</div>
				</div>
			</div>
	</div>
</div>
</div>
<div ng-include="sys_html('common/_menu')"></div>
<script>
for (var i = 1; i < 100; i++){
  window.clearInterval(i);
}
scope.loading = false;  //状态标记
scope.isnodata = false;
//滚动加载
var page = 1;
scope.pagedata.getlist=function(status){
		var status = status ? status : scope.pagedata.status;
		if(status){
			scope.pagedata.goods=[]
			page=1
			for (var i = 1; i < 100; i++){
			  window.clearInterval(i);
			}
		}
		var pid = scope.pagedata.pid;
		var cid = scope.pagedata.cid;
		console.log(cid);
		var keyword = scope.pagedata.params.keyword ? scope.pagedata.params.keyword : '';
		var ishot = scope.pagedata.params.ishot ? scope.pagedata.params.ishot : '';
		var params = {
					'plugin':'jy_jdpm',
					'action':'goodslist',
					'op':'main',
					'query':'page='+page+'&status='+status+'&cid='+cid+'&pid='+pid+'&datanew=1'+'&keyword='+keyword+'&ishot'+ishot,
					'callback':function(data){
						console.log('data');console.log(data);
							if(data.error !=1){
								for (var i=0;i<data.goods.length;i++){
									scope.pagedata.goods.push(data.goods[i]);
								}
								if(page >1){
									$("#goodslist").animate({scrollTop:0},300);
								}
								console.log('data.goods');console.log(data.goods);
								if(data.goods.length<1){
									scope.isnodata=true;
								}
								page++;
								scope.loading = false;
								scope.$evalAsync();
								setTimeout('uptime()',1000);
							}else{
								console.log('error');
							};
					}
		}
		scope.post_json(params);
}
scope.pagedata.getlist(1);
window.addEventListener('scroll', function () {
    if(!scope.isnodata && !scope.loading &&  window.pageYOffset + window.innerHeight >= document.documentElement.scrollHeight){
        scope.loading = true;  //状态标记
		scope.pagedata.getlist();
     }
	 var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
     if(scrollTop > window.innerHeight){
        scope.showgotop = true;  //状态标记
		scope.$evalAsync();
	 }else{
		scope.showgotop = false;  //状态标记
		scope.$evalAsync();
	 }
})
</script>

<script>
function uptime(){
	var goods = scope.pagedata.goods;
	var ntime = scope.pagedata.ntime;
	for (var i = 0; i < goods.length; i++) {
		console.log(i);
		var key =goods[i].id
		var endtime = goods[i].endtime
		endDown(endtime, ntime, ".goodsuptime"+key, ".goodsuptime"+key+" .day", ".goodsuptime"+key+" .hour", ".goodsuptime"+key+" .minute", ".goodsuptime"+key+" .second", ".goodsuptime"+key+" .msec");
	}
}
// 结束倒计时
function endDown(etime, ntime, boxobj, day_elem, hour_elem, minute_elem, second_elem, msec_elem) {
	console.log(etime);console.log(ntime);
    var now_time = new Date(ntime * 1000);
    var end_time = new Date(etime * 1000);
	
    var native_time = new Date().getTime();     //本地时间
    var now_cha = now_time - native_time;       //服务器和本地时间差
    var native_end_time = end_time - now_cha;   //本地结束时间
    var sys_second = 0;

    endDowntimer = setInterval(function () {
        // 检查本地时间是否更改
        sys_second = (native_end_time - new Date().getTime()) / 100; //本地结束剩余时间
        sys_second -= 1;
        var day = Math.floor((sys_second / 36000) / 24);
        var hour = Math.floor((sys_second / 36000) % 24);
        var minute = Math.floor((sys_second / 600) % 60);
        var second = Math.floor((sys_second / 10) % 60);
        var msec = Math.floor(sys_second % 10); //毫秒

        day = day >= 0 ? day : 0;
        hour = hour >= 0 ? hour : 0;
        minute = minute >= 0 ? minute : 0;
        second = second >= 0 ? second : 0;
        msec = msec >= 0 ? msec : 0;

        day_elem && $(day_elem).text(day);//计算天
        $(hour_elem).text(hour < 10 ? "0" + hour : hour);//计算小时
        $(minute_elem).text(minute < 10 ? "0" + minute : minute);//计算分
        $(second_elem).text(second < 10 ? "0" + second : second);// 计算秒
        $(msec_elem).text(msec);// 计算秒的1/10
        native_time = new Date().getTime();
    }, 100);
}

// 校准结束时间
function calibrationEndtime(etime, ntime) {
    clearInterval(endDowntimer);
    endDown(etime, ntime, ".onBidtime", ".onBidtime .day", ".onBidtime .hour", ".onBidtime .minute", ".onBidtime .second", ".onBidtime .msec");
}

// 开始时间倒计时
function startDown(stime, ntime, boxobj, day_elem, hour_elem, minute_elem, second_elem, msec_elem) {
    var now_time = new Date(ntime * 1000);
    var end_time = new Date(stime * 1000);
    var native_time = new Date().getTime(); //本地时间
    var now_cha = now_time - native_time; //服务器和本地时间差
    var native_end_time = end_time - now_cha; //本地结束时间
    var sys_second = 0;
    startDowntimer = setInterval(function () {
        // if (Math.abs(native_time - new Date().getTime()) > 5000) {
        //     clearInterval(startDowntimer);
        //     $.post(ajaxGetTime, {'pid': Pid}, function (data) {
        //         calibrationStarttime(data.starttime, data.nowtime);
        //     });
        // }
        sys_second = (native_end_time - new Date().getTime()) / 100; //本地结束剩余时间
        if (sys_second > 0) {
            sys_second -= 1;
            var day = Math.floor((sys_second / 36000) / 24);
            var hour = Math.floor((sys_second / 36000) % 24);
            var minute = Math.floor((sys_second / 600) % 60);
            var second = Math.floor((sys_second / 10) % 60);
            var msec = Math.floor(sys_second % 10); //毫秒
            day_elem && $(day_elem).text(day);//计算天
            $(hour_elem).text(hour < 10 ? "0" + hour : hour);//计算小时
            $(minute_elem).text(minute < 10 ? "0" + minute : minute);//计算分
            $(second_elem).text(second < 10 ? "0" + second : second);// 计算秒
            $(msec_elem).text(msec);// 计算秒的1/10
            native_time = new Date().getTime();
        } else {
            // $('.noStartBidTbox .th').html('拍卖已开始');
            // $(boxobj).html('<div class="into">正在进入拍卖...</div>');

            clearInterval(startDowntimer);
            window.location.href = window.location.href + "?id=" + 10000 * Math.random();
        }
    }, 100);
}

// 校准开始时间
function calibrationStarttime(stime, ntime) {
    clearInterval(startDowntimer);
    startDown(stime, ntime, ".noStartTime", ".noStartTime .day", ".noStartTime .hour", ".noStartTime .minute", ".noStartTime .second", ".noStartTime .msec");
}
window.addEventListener('scroll', function () {
	 if(document.documentElement.scrollTop > window.innerHeight){
        scope.gotop = true;  //状态标记
		scope.$evalAsync();
	 }else{
		scope.gotop = false;  //状态标记
		scope.$evalAsync();
	 }
})
    /**
     * 将数值四舍五入(保留2位小数)后格式化成金额形式
     * @param num 数值(Number或者String)
     * @return 金额格式的字符串,如'1,234,567.45'
     * @type String
     */
    function formatCurrency(num) {
        num = num.toString().replace(/\$|\,/g, '');
        if (isNaN(num))
            num = "0";
        sign = (num == (num = Math.abs(num)));
        num = Math.floor(num * 100 + 0.50000000001);
        cents = num % 100;
        num = Math.floor(num / 100).toString();
        if (cents < 10)
            cents = "0" + cents;
        for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
            num = num.substring(0, num.length - (4 * i + 3)) + ',' +
                num.substring(num.length - (4 * i + 3));
        return (((sign) ? '' : '-') + num + '.' + cents);
    }
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>
</div>